// 用户登录请求
export interface LoginRequest {
  email: string;
  password: string;
}

// 用户注册请求
export interface SignupRequest {
  name: string;
  email: string;
  password: string;
}

// 认证响应数据部分
export interface AuthData {
  token: string;
  user: User;
}

// 认证响应（完整的API响应结构）
export interface AuthResponse {
  code: number;
  status: boolean;
  message: string;
  data: AuthData;
}

// 用户信息
export interface User {
  _id: string;
  name: string;
  email: string;
  role: number; // 1-超级管理员, 2-管理员, 3-普通用户
  isVerified: boolean;
  profilePic: {
    _id: string;
    key: string;
    size: number;
    mimetype: string;
    createdBy: string;
    createdAt: string;
    updatedAt: string;
  } | string | null;
  createdAt: string;
  updatedAt: string;
}

// API响应基础结构 - 统一为API文档格式
export interface ApiResponse<T = any> {
  code: number;
  status: boolean;
  message: string;
  data?: T;
}

// 修改密码请求
export interface ChangePasswordRequest {
  oldPassword: string;
  newPassword: string;
}

// 更新用户信息请求
export interface UpdateProfileRequest {
  name: string;
  email: string;
  profilePic?: string; // 文件ID
}

// 忘记密码请求
export interface ForgotPasswordRequest {
  email: string;
}

// 重置密码请求
export interface ResetPasswordRequest {
  email: string;
  code: string;
  password: string;
}

// 邮箱验证请求
export interface VerifyEmailRequest {
  email: string;
  code: string;
} 